package com.soulgame.notification;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * 灵游广告通知接收者
 * */
public class NotifyReceiver extends BroadcastReceiver implements INotifiContants{
	

	@Override
	public void onReceive(Context context, Intent intent) {
		System.out.println("****onReceive****");
		String action = intent.getAction();
		if(ACTION_NOTIFY.equals(action)){
			String title = intent.getStringExtra(TITLE);
			String text = intent.getStringExtra(TEXT);
			int index = intent.getIntExtra(INDEX, 0);
			String iconName = intent.getStringExtra(ICON_NAME);
			String soundName = intent.getStringExtra(SOUDN_NAME);
			String strClassName = intent.getStringExtra(OPEN_ACTIVITY_NAME);
			NotifyUtil.sendNotify(context,index,title, text,iconName,soundName,strClassName);
		}
	}
}
